// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 问题处理操作类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022-04-13
 */
public enum DealOperateEnum {

    CONFIRM(1, "确认"),
    DEFERRED(2, "延期处理"),
    BUSINESS_ERROR(3, "业务错误"),
    HANDLED(4, "已处理"),
    REPETITIVE(5, "重复问题"),
    NON_EXISTENT (6, "问题不存在"),
    VERIFICATION_FAILED(7, "验证不通过"),
    VERIFICATION_SUCCESS(8, "验证通过"),
    CLOSED(9, "关闭");

    private int value;

    private String name;

    DealOperateEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        DealOperateEnum arrObj[] = DealOperateEnum.values();
        for (DealOperateEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }

}
